home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib9 / v_11_07 / 1107118b < prev    next >
Encoding:
Text File  |  1995-11-01  |  278 b   |  23 lines

  1. //
  2. // tree.h - tree interface using global classes
  3. //
  4.  
  5. struct treenode
  6.     {
  7.     treenode(const char *w);
  8.     char *word;
  9.     treenode *left, *right;
  10.     };
  11.  
  12. class tree
  13.     {
  14. public:
  15.     tree();
  16.     ~tree();
  17.     void add(const char *w);
  18.     void print();
  19. private:
  20.     treenode *root;
  21.     };
  22.  
  23.